package ObserverPattern;

/**
 * @Author: zhaojie
 * @Date: Created in 18:05 2018/6/25
 * @Description:
 */
public class HelloObserver extends Observer {
    public HelloObserver(Subject subject) {
        this.subject=subject;
        this.subject.attach(this);
    }

    @Override
    public void update() {
        System.out.println("this is my Obsever:"+subject.getState());
    }
}
